#ifndef __UDSF_PROC_DBSCAN_C__
#define __UDSF_PROC_DBSCAN_C__

#include "app.h"

#include "udsf_cstdlike.c"
#include "udsf_spi.c"
#include "udsf_uart.c"
/*
*   notice:
*   UDSF 同UDF编程：不可调用cstd-lib,只可调用"sdk_ifs_udk_cfg.h"、"sys_api.h"中列出的API函数。
*   UDSF文件内函数均需使用static修饰符，且UDF中以#include "udsf_xxx.c"形式引用
*/

static void udsf_dbscan_init(struct dbscan_cluster *p_dbscan_cluster,dbscan_cluster_t *pDBSCAN,DBSCANCFG     *pDBSCAN_cfg) __attribute__((unused));

static void udsf_dbscan_init(struct dbscan_cluster *p_dbscan_cluster,dbscan_cluster_t *pDBSCAN,DBSCANCFG     *pDBSCAN_cfg){

	CSTD_MEMSET(pDBSCAN,0,sizeof(dbscan_cluster_t));

	pDBSCAN->dbscan_frame.pt            = pDBSCAN->dbscan_frame.pt_buff;
	pDBSCAN->dbscan_nbA.idx             = pDBSCAN->dbscan_nbA.idx_buff;
	pDBSCAN->dbscan_nbB.idx             = pDBSCAN->dbscan_nbB.idx_buff;
	pDBSCAN->dbscanClu.cluster          = pDBSCAN->dbscanClu.cluster_buff;
	pDBSCAN->dbscan_cfg                 = *pDBSCAN_cfg;

	p_dbscan_cluster->dbscanFrame       = (DBSCANFRAME*)&pDBSCAN->dbscan_frame;
	p_dbscan_cluster->dbscanClu         = (DBSCANOUT*)&pDBSCAN->dbscanClu;
	p_dbscan_cluster->nbA               = (DBSCANNB*)&pDBSCAN->dbscan_nbA;
	p_dbscan_cluster->nbB               = (DBSCANNB*)&pDBSCAN->dbscan_nbB;
	p_dbscan_cluster->cfg               = &pDBSCAN->dbscan_cfg;

	p_dbscan_cluster->cluster_max_num   = CLUSTER_NUM_MAX;
	p_dbscan_cluster->frame_max_num     = CLUSTER_INPUT_MAX;
}

#endif
